<!DOCTYPE html>
<html lang="zh-CN" class="no-js">
<head>
    <meta charset="utf-8">
    <meta http-equiv="cache-control" content="max-age=0">
    <meta http-equiv="cache-control" content="no-cache">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
    <link href="http://libs.baidu.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
    <script src="http://libs.baidu.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js"></script>
    <title>直播 -</title>
    <style type="text/css">
        html, body { height: 100% }
        body { margin: 0; overflow:hidden;}
        *{padding: 0;margin: 0;list-style: none;}
         html,body{margin:0px;padding:0px;width: 100%;height:100%;font-size: 62.5%;}
        .main-box{position: absolute;width:100%;height: 100%;left: 0;top: 0;}
        .video-img{position: absolute;width:100%;height:100%;z-index: 999;top: 0;left: 0;}
        .video-view{display: block;width: 100%;height: 100%;margin: 0 auto;}
        .video-player{position:absolute;width:100%;height: 100%; top: 0;left: 0;}
        .btn-play{position: absolute;width: 100%;height: 100%;background: url(__PUBLIC__/Common/static/img/play1.png) no-repeat center;top: 0;left: 0;background-size:90px; }
        #video-player{
            width:80%;
            height: 80%;
        }
    </style>
</head>
<body >
    <div class="main-box no-header clearfix">
        <div class="video-img">
            <img class="video-view" src="__PUBLIC__/Common/static/images/videodemo.png" />
            <a class="btn-play" id="video-button" href="javascript:playLiveChannel()"></a>
        </div>
        <video class="video-player"  id="video-player"  controls></video>
    </div>
<script src="__PUBLIC__/lib/player/swfobject.js"></script> <!--必须的的-->
<script type="text/javascript" src="__PUBLIC__/lib/player/swffit.js"></script>
<script lang="text/javascript">
    var $URL = "__PUBLIC__/lib/player/";
    function playLiveChannel() {
        src = "{$play_address}";
        var swfPlayer = new SWFPlayer("video-container", "video-player", "550", "375", "8.0.0");
        $(".video-img").hide();
        swfPlayer.reload(src);
    }

    var SWFPlayer = function(_parent_id,_player_id,_width,_height, _poster){
        var parent_id = _parent_id;
        var player_id = _player_id;
        var width = _width;
        var height = _height;
        var poster = _poster;

        function createPlayer(src){
            var parameters = {
                src: src,
                autoPlay: "true",
                verbose: "true",
                controlBarAutoHide: "true",
                controlBarPosition: "bottom",
                poster: poster,
                plugin_hls: $URL+"HLSDynamicPlugin.swf"
            };
            var wmodeValue = "transparent";
            swfobject.embedSWF(
                    $URL+"StrobeMediaPlayback.swf"
                    , player_id
                    , width
                    , height
                    , "11"
                    , $URL+"expressInstall.swf"
                    , parameters
                    , {
                        allowFullScreen: "true",
                        wmode: wmodeValue
                    }
                    , {
                        name: player_id
                    }
            );
        };
        createPlayer("");
        this.reload = function(src){
            createPlayer(src);
        };
    };

</script>
</body>
</html>
